﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace FBApp
{
	/// <summary>
	/// Interaction logic for NotificationBalloon.xaml
	/// </summary>
	public partial class NotificationBalloon : UserControl
	{
		public enum NotificationType
		{
			Comment,
            Like,
			PhotoTagged,
            Relationship,
            Link
		}

        public NotificationBalloon(NotificationType type, string message)
		{
			this.InitializeComponent();
            txtNotification.Text = message;
            BitmapImage bi;
            try
            {
                switch (type)
                {
                    case NotificationType.Comment:
                        bi = new BitmapImage(new Uri("/Resources/Images/notification.png",UriKind.Relative));
                        img.Source = bi;
                        break;
                    case NotificationType.Like:
                        bi = new BitmapImage(new Uri("/Resources/Images/like.png",UriKind.Relative));
                        img.Source = bi;                        
                        break;
                    case NotificationType.PhotoTagged:
                        break;
                    case NotificationType.Relationship:
                        bi = new BitmapImage(new Uri("/Resources/Images/heart.png",UriKind.Relative));
                        img.Source = bi; 
                        break;
                    case NotificationType.Link:
                        bi = new BitmapImage(new Uri("/Resources/Images/link.png", UriKind.Relative));
                        img.Source = bi;
                        break;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error displaying Image: " + ex.Message);
            }
		}
	}
}